<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>绝对定位练习(absolute position exercises)</title>
  <!-- reset - 重置代码 -->
  <style>
    a {
      text-decoration: none;
      color: #333;
    }

    img {
      vertical-align: top;
    }
  </style>
  <!-- common - 公共代码 -->
  <style>
    .sprite_02 {
      display: inline-block;
      background-image: url(../../images/music_sprite_02.png);
    }

    .sprite_02_icon_music {
      width: 14px;
      height: 11px;
      background-position: 0 -24px;
    }

    .sprite_02_icon_play {
      width: 16px;
      height: 17px;
      background-position: 0 0;
    }
  </style>
  <!-- 当前页面代码 -->
  <style>
    .position-absolute {
      width: 140px;
      margin: 0 auto;
    }

    .position-absolute .top {
      position: relative;
    }

    .position-absolute .top .cover {
      position: absolute;
      left: 0;
      top: 0;
      right: 0;
      bottom: 0;

      background-image: url(../../images/music_sprite_01.png);
      background-position: 0 0;
    }

    .position-absolute .top .info {
      position: absolute;
      left: 0;
      bottom: 0;
      right: 0;
      height: 27px;
      line-height: 27px;
      padding-left: 10px;

      font-size: 12px;
      color: #ccc;

      background-image: url(../../images/music_sprite_01.png);
      background-position: 0 -537px;
    }

    .position-absolute .top .info .icon-music {
      position: relative;
      top: 1px;
    }

    .position-absolute .top .info .count {
      margin-left: 4px;
    }

    .position-absolute .top .info .icon-play {
      position: absolute;
      top: 0;
      bottom: 0;
      right: 0;
      margin: auto 0;
    }

    /* 底部样式 */
    .position-absolute .bottom {
      display: block;
      margin-top: 8px;
      font-size: 14px;
    }

    .position-absolute .bottom:hover {
      text-decoration: underline;
    }
  </style>
</head>
<body>

  <div class="position-absolute">
    <div class="top">
      <img src="../../images/music_album01.jpg" alt="音乐封面">
      <a href="#" class="cover"></a>
      <div class="info">
        <i class="sprite_02 sprite_02_icon_music icon-music"></i>
        <span class="count">63万</span>
        <i class="sprite_02 sprite_02_icon_play icon-play"></i>
      </div>
    </div>
    <a href="#" class="bottom">
      天气好的话，把耳机丢进海里吧
    </a>
    <i class="sprite_02 sprite_02_icon_play"></i>
    <i class="sprite_02 sprite_02_icon_music"></i>
  </div>
  
</body>
</html>